// import type { RouteRecordRaw } from 'vue-router';

import { $t } from '#/locales';

// const routes: RouteRecordRaw[] = [
const routes = [
  {
    name: 'home',
    meta: {
      icon: 'ion:speedometer',
      order: 1,
      title: $t('baz.home'),
      noCache: false,
      link: null,
    },
    components: {},
    path: '/',
  },
  {
    name: 'md',
    meta: {
      icon: 'icon-park-outline:calendar-dot',
      order: 2,
      title: $t('baz.main'),
      noCache: false,
      link: null,
    },
    path: '/md',
    children: [
      {
        name: 'Manage',
        path: '/analytics',
        // 异步加载 动态加载
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'ion:file-tray',
          title: $t('baz.main-ls.manage'),
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Classify',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'carbon:data-class',
          title: $t('baz.main-ls.classify'),
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Measure',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'gis:measure-area',
          title: $t('baz.main-ls.measure'),
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Customer',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'ix:customer',
          title: $t('baz.main-ls.customer'),
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Supplier',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'carbon:scis-transparent-supply',
          title: $t('baz.main-ls.supplier'),
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Workshop',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'arcticons:zoho-workdrive',
          title: $t('baz.main-ls.workshop'),
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Workstation',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'grommet-icons:workshop',
          title: $t('baz.main-ls.workstation'),
          noCache: false,
          link: null,
        },
      },
    ],
  },
  {
    name: 'wm',
    meta: {
      icon: 'mdi:warehouse',
      order: 3,
      title: $t('baz.warehouse'),
      noCache: false,
      link: null,
    },
    path: '/wm',
    children: [
      {
        name: 'Warehouse',
        path: '/analytics',
        // 异步加载 动态加载
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'arcticons:thai-dict',
          title: '仓库设置',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Wmstock',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'cil:chart',
          title: '库存现有量',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Itemrecpt',
        path: '/analytics',
        // 异步加载 动态加载
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'mdi:form-select',
          title: '采购入库',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Arrivalnotice',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'ri:wechat-pay-line',
          title: '到货通知',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Rtvendor',
        path: '/analytics',
        // 异步加载 动态加载
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'cil:link-broken',
          title: '采购退货',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Issue',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'material-symbols-light:table-edit-sharp',
          title: '生产领料',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Rtissue',
        path: '/analytics',
        // 异步加载 动态加载
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'majesticons:login-line',
          title: '生产退料',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Productrecpt',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'icon-park-solid:shopping',
          title: '产品入库',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Productsales',
        path: '/analytics',
        // 异步加载 动态加载
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'ri:guide-fill',
          title: '销售出库',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Rtsales',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'ph:link-break-duotone',
          title: '销售退货',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Transfer',
        path: '/analytics',
        // 异步加载 动态加载
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'devicon-plain:swagger',
          title: '转移调拨',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Stocktaking',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'gg:list',
          title: '库存盘点',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Package',
        path: '/analytics',
        // 异步加载 动态加载
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'jam:table',
          title: '装箱管理',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Barcode',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'bx:barcode',
          title: '赋码管理',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Sn',
        path: '/analytics',
        // 异步加载 动态加载
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'token:sn',
          title: 'SN码',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Outsourceissue',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'iconoir:drag-solid',
          title: '外协发料',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Outsourcerecpt',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'material-symbols:dynamic-form-outline',
          title: '外协入库',
          noCache: false,
          link: null,
        },
      },
    ],
  },
  {
    name: 'dv',
    meta: {
      icon: 'devicon-plain:redis',
      order: 4,
      title: '设备管理',
      noCache: false,
      link: null,
    },
    path: '/dv',
    children: [
      {
        name: 'Machinerytype',
        path: '/analytics',
        // 异步加载 动态加载
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'la:swatchbook',
          title: '设备类型设置',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Machinery',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'tdesign:system-search',
          title: '设备台账',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Dvsubject',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'entypo:flow-cascade',
          title: '点检保养项目',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Checkplan',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'fluent-mdl2:build-queue-new',
          title: '点检保养计划',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Repair',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'eos-icons:system-image-outlined',
          title: '维修单',
          noCache: false,
          link: null,
        },
      },
    ],
  },
  {
    name: 'tm',
    meta: {
      icon: 'mdi:folder-lock-outline',
      order: 5,
      title: '工装夹具管理',
      noCache: false,
      link: null,
    },
    path: '/tm',
    children: [
      {
        name: 'Tooltype',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'lsicon:tree-filled',
          title: '类型设置',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Tool',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'ic:baseline-date-range',
          title: '工装夹具台账',
          noCache: false,
          link: null,
        },
      },
    ],
  },
  {
    name: 'pro',
    meta: {
      icon: 'material-symbols:switch',
      order: 6,
      title: '生产管理',
    },
    path: '/pro',
    children: [
      {
        name: 'Workorder',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'ph:log',
          title: '生产工单',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Process',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'simple-icons:apachedruid',
          title: '工序设置',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Proroute',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'icon-park-outline:nested-arrows',
          title: '工艺流程',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Proschedule',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'fluent-mdl2:build-definition',
          title: '生产排产',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Feedback',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'bxs:chart',
          title: '生产报工',
          noCache: false,
          link: null,
        },
      },
    ],
  },
  {
    name: 'qc',
    meta: {
      icon: 'pepicons-pop:rewind-time-circle-filled',
      order: 7,
      title: '质量管理',
    },
    path: '/qc',
    children: [
      {
        name: 'Qcdefect',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'mdi:bug-outline',
          title: '常见缺陷',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Qcindex',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'clarity:checkbox-list-line',
          title: '检测项设置',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Qctemplate',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'catppuccin:folder-examples-open',
          title: '质检方案',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Pendinginspect',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'fluent:form-20-filled',
          title: '待检任务',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Iqc',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'material-symbols:box-edit',
          title: '来料检验',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Ipqc',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'carbon:batch-job-step',
          title: '过程检验',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Oqc',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'arcticons:privacy-guides',
          title: 'Oqc',
          noCache: false,
          link: null,
        },
      },
    ],
  },
  {
    name: 'cal',
    meta: {
      icon: 'icon-park-outline:peoples-two',
      order: 8,
      title: '排班管理',
      noCache: false,
      link: null,
    },
    path: '/cal',
    children: [
      {
        name: 'Team',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'icon-park-twotone:peoples',
          title: '班组设置',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Plan',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'simple-icons:esbuild',
          title: '排班计划',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Holiday',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'mdi:airplane-date',
          title: '节假日设置',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Calendar',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'lets-icons:date-range-duotone',
          title: '排班日历',
          noCache: false,
          link: null,
        },
      },
    ],
  },
  {
    name: 'report',
    meta: {
      icon: 'hugeicons:table',
      order: 9,
      title: '报表管理',
      noCache: false,
      link: null,
    },
    path: '/report',
    children: [
      {
        name: 'Report',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'openmoji:edit',
          title: '报表清单',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Designer',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'tdesign:map-edit-filled',
          title: '报表设计',
          noCache: false,
          link: null,
        },
      },
    ],
  },
  {
    name: 'print',
    meta: {
      icon: 'lucide:scan-barcode',
      order: 9,
      title: '打印管理',
      noCache: false,
      link: null,
    },
    path: '/print',
    children: [
      {
        name: 'Printerconfig',
        path: '/analytics',
        component: () => import('#/views/dashboard/analytics/index.vue'),
        meta: {
          affixTab: true,
          icon: 'tdesign:system-device-filled',
          title: '打印机配置',
          noCache: false,
          link: null,
        },
      },
      {
        name: 'Printtemplate',
        path: '/workspace',
        component: () => import('#/views/dashboard/workspace/index.vue'),
        meta: {
          affixTab: true,
          icon: 'fluent-mdl2:documentation',
          title: '打印模板',
          noCache: false,
          link: null,
        },
      },
    ],
  },
];

export default routes;
